package test;

import java.util.Scanner;

public class ClientsCreator {
    public static void main(String[] args) {
        new Thread() {
            @Override
            public void run() {
                while(true) {
                    System.out.println("alive clients - " + ChatClient.getClientsNumber());
                    try {
                        Thread.sleep(5000);
                    } catch (InterruptedException e) {
                    }
                }
            }
        }.start();

        Scanner scanner = new Scanner(System.in);
        while(true) {
            int n = scanner.nextInt();
            for (int i = 0; i < n; i++) {
                new ChatClient().start();
            }
        }
    }
}
